import Mock from 'mockjs'
import {dateFormat} from 'vux'
import {contextPath} from "../api";

const subscribeItem = {
  status:'success',
  data:{
    SUBSCRIBE_ID: '@string(32)',
    SUBSCRIBE_NUMBER:'20181212100'+'@integer(100000000, 999999999)',
    SUBSCRIBER: '@cname',
    'SUBSCRIBE_TYPE|1':[0,1],//0-普通 1-节日派对
    'SUBSCRIBE_MODE|1':[1,2,3,4],//1-自助预约 2-销售预约 3-老板预约 4-股东预约
    'PHONE|1': ['13567686796','13756462564','13354657567'],
    CUSTOMER_NAME: '@cname',
    CONSUMPTION_NUMBER: '@integer(1, 10)',
    ROOMPLATFORMTYPE_ID: '@string(32)',
    'ROOM_PLATFORM_TYPE|1': ['散台','卡座','高卡','包厢'],
    STATE: '@integer(0, 8)',//预约状态 0-正在预约 1-成功 2-失败 3-取消 4-已到店 5-超时 6-已开单 7-已消费 8-未付押金
    SUBSCRIBE_DATETIME:dateFormat(new Date().setDate(new Date().getDate()+30), 'YYYY-MM-DD HH:mm'),
    'REMARK|1':['','@csentence'],
    'DEPOSIT|1':['','@float(1000, 10000, 2, 2)']
  }
}

const subscribeList = {
  status:'success',
  'data|8':[
    {
      SUBSCRIBE_ID: '@string(32)',
      ORDER_ID: '@string(32)',
      SUBSCRIBE_NUMBER:'20181212100'+'@integer(100000000, 999999999)',
      'SUBSCRIBE_TYPE|1':[0,1],//0-普通 1-节日派对
      SUBSCRIBER: '@cname',
      'PHONE|1': ['13567686796','13756462564','13354657567'],
      CUSTOMER_NAME: '@cname',
      CONSUMPTION_NUMBER: '@integer(1, 10)',
      'ROOM_PLATFORM_TYPE|1': ['散台','卡座','高卡','包厢'],
      'AREA|1':['大厅区','吧台区','包厢区'],
      'NUMBER|1':['A1台','B1台','C1台','M1台','A2台','B2台','C2台','M2台','A3台','B3台','C3台','M3台','1号房'],
      STATE: '@integer(0, 8)',//预约状态 0-正在预约 1-成功 2-失败 3-取消 4-已到店 5-超时 6-已开单 7-已消费 8-未付押金
      SUBSCRIBE_DATETIME:'@datetime("yyyy-MM-dd HH:mm")',
      'REMARK|1':['','@csentence'],
      'saled|1':[0,'@float(1000, 10000, 2, 2)'],
      'presented|1':[0,'@float(1000, 10000, 2, 2)'],
    }
  ]
}

const subscribeStatus = {
  status:'success',
  data:{
    payOrNot:Mock.Random.boolean(),
    SUBSCRIBE_ID: '@string(32)'
  },
  msg:'后端返回的提示信息'
}

const holidayPartyItem = {
  status:'success',
  data: {
    HOLIDAYPARTY_ID: '@string(32)',
    PARTY_NAME:'@csentence',
    START_DATETIME:dateFormat(new Date().setDate(new Date().getDate()+30), 'YYYY-MM-DD HH:mm'),
    END_DATETIME:dateFormat(new Date().setDate(new Date().getDate()+33), 'YYYY-MM-DD HH:mm'),
    'STATE|1':[0,1,2],//0-预约中 1-结束 2-停用
    DESCRIPTION:'<img src="/assets/images/test/testMealItem1.jpg"/>'+'@cparagraph()'+'<img src="/assets/images/test/testMealItem2.jpg"/>'+'@cparagraph()',
    CREATE_DATETIME:dateFormat(new Date().setDate(new Date().getDate()-10), 'YYYY-MM-DD HH:mm')
  }
}

const holidayPartyList = {
  status:'success',
  'data|5':[
    {
      HOLIDAYPARTY_ID: '@string(32)',
      PARTY_NAME:'@csentence',
      START_DATETIME:dateFormat(new Date().setDate(new Date().getDate()+30), 'YYYY-MM-DD HH:mm'),
      END_DATETIME:dateFormat(new Date().setDate(new Date().getDate()+33), 'YYYY-MM-DD HH:mm'),
      'STATE|1':[0,1,2],//0-预约中 1-结束 2-停用
      CREATE_DATETIME:dateFormat(new Date().setDate(new Date().getDate()-10), 'YYYY-MM-DD HH:mm'),
      'IMAGE|1':['/assets/images/test/testMealItem1.jpg','/assets/images/test/testMealItem2.jpg','/assets/images/test/testMealItem3.jpg','/assets/images/test/testMealItem4.jpg','/assets/images/test/testMealItem5.jpg']
    }
  ]
}

const depositAbout = {
  status:'success',
  data:{
    deposit:500,
    description:'1.该订金仅用于本次预订使用，预订成功后将用于抵扣本次预订到店消费款；<br/>2.在到达预约时间前未到店，订金将不予退还；'
  }
}

const depositTerm = {
  status:'success',
  data:{
    pdfjsPath:'/assets/pdfjs',
    DepositTermPath:'/assets/testPDF.pdf'
  }
}

const cancelSubscribeStatus = {
  status:'success',
  msg:'后端返回的提示信息'
}

export {subscribeItem,subscribeList,subscribeStatus,holidayPartyItem,holidayPartyList,depositAbout,depositTerm,cancelSubscribeStatus}
